package com.mhwx.mhlive.ui.widget;

import android.app.Activity;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.PopupWindow;

import com.mhwx.mhlive.R;


/**
 * 类功能描述
 *  底部弹框
 * @author Guol
 * @version 1.0
 * @copyright 北京明华维新信息技术有限公司
 * @time 2017/5/2
 */
public class FinishProjectPopupWindows extends PopupWindow {
    private View mView;
    private ImageView img_out;

    public    FinishProjectPopupWindows(Activity context, View.OnClickListener onClickListener){

        LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
        mView = inflater.inflate(R.layout.finish_project_popuwindow, null);

        img_out= (ImageView) mView.findViewById(R.id.img_out);

        img_out.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                dismiss();
            }
        });

        //设置PopupWindow的View
        this.setContentView(mView);
        //设置PopupWindow弹出窗体的宽
        this.setWidth(LinearLayout.LayoutParams.MATCH_PARENT);
        //设置PopupWindow弹出窗体的高
        this.setHeight(LinearLayout.LayoutParams.WRAP_CONTENT);
        //设置PopupWindow弹出窗体可点击
        this.setFocusable(true);
        //设置SelectPicPopupWindow弹出窗体动画效果
        this.setAnimationStyle(R.style.Animation);
        //实例化一个ColorDrawable颜色为半透明
//        ColorDrawable dw = new ColorDrawable(0xb0000000);
        //设置SelectPicPopupWindow弹出窗体的背景
//        this.setBackgroundDrawable(dw);

    }


}
